package webank.d20210910.t3;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;

/**
 * @author habitplus
 * @since 2021-09-10 20:45
 */
public class Main {
    private static final StreamTokenizer st = new StreamTokenizer(
            new BufferedReader(new InputStreamReader(System.in)));

    static int nextInt() {
        try {
            st.nextToken();
            return (int) st.nval;
        } catch (IOException e) {
            e.printStackTrace();
        }
        return 0;
    }

    private static int[] solve(int[] arr) {
        if (arr == null || arr.length == 0) {
            return new int[0];
        }

        int evenSum = 0;
        int oddSum = 0;
        for (int i = 0; i < arr.length; i++) {
            if (((i + 1) & 1) == 0) {
                // 偶数 odd - even - x = arr[i]
                arr[i] = oddSum - evenSum - arr[i];
                evenSum += arr[i];
            } else {
                // 奇数 odd + x - even = arr[i]
                arr[i] = arr[i] + evenSum - oddSum;
                oddSum += arr[i];
            }
        }

        return arr;
    }

    public static void main(String[] args) {
        int n = nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = nextInt();
        }

        arr = solve(arr);
        StringBuilder sb = new StringBuilder();

        for (int e : arr) {
            sb.append(e).append(" ");
        }
        System.out.println(sb.toString());

    }
}
